﻿Looks Like Me, Thinks Like Me: Descriptive Representation and Opinion Congruence in Brazil. Latin American Research Review 54, 2 (2019).Replication ArchiveTaylor C. BoasAmy Erica SmithJune 22, 2019This replication archive contains files necessary to replicate the results in  Taylor C. Boas and Amy Erica Smith, “Looks Like Me, Thinks Like Me: Descriptive Representation and Opinion Congruence in Brazil.” Latin American Research Review 54, 2 (2019). Analysis was conducted in R 3.6.0 on MacOS 10.13.6 and StataSE Version 14 on Windows 10 Enterprise. R files were run by opening each file, selecting all code, and sending it to the console, rather than by using source(). Please note that the following R packages must be installed in order to run the replication code: XML, foreign, Hmisc, car, lmtest, sandwich, lattice, weights, readstata13. Please note that exporting the Stata output to LaTeX requires the package estout.The user will need to download several publicly-available survey data files and place them in the replication folder prior to running the code. We have confirmed that the replication code works with the versions of these files downloaded in early June 2019. If the filenames downloaded in the future differ from those below, the data files may have changed, and some revision of the code may be necessary to replicate the published results. AmericasBarometer Brazil 2006-2007: 2138048899brazil_lapop_dims final 2007 v5.dtaAmericasBarometer Brazil 2008: 30541815brazil_lapop_dims_2008_final_data_set_v10.dtaAmericasBarometer Brazil 2010: 7948266051039660950Brazil_LAPOP_AmericasBarometer 2010 data set  approved v4.dtaAmericasBarometer Brazil 2012: 54861031Brazil LAPOP AmericasBarometer 2012 Rev1_W.dtaBrazilian Electoral Panel Study 2010: BEPSwaves123_long.dtaLatinobarómetro 2011: Latinobarometro_2011_esp.dtaLatinobarómetro 2013: Latinobarometro2013.dta, Latinobarometro2013.sav (both Stata and SPSS versions are needed)Democratic Accountability and Linkages Project: partylevel_20130907.dtaChurches North and South Clergy Survey: ChurchesNorthAndSouth_Brazil2014.dtaChurches North and South Congregant Survey: ChurchesNorthAndSouth_Brazil2014_Clergy.dtaSeveral other survey data files are provided in the replication archive. For the Brazilian Legislative Surveys, we were given access to the identified data in order to merge in indicators for evangelical and Afro-Brazilian legislators as well as roll-call votes on several bills. The identified data and the code used for merging cannot be shared. Hence, we provide versions of the public, de-identified files, augmented with the additional variables used in the analysis.For Latinobarómetro data from 2002-2010, the versions of the data files originally used for the analysis (downloaded November 2013) have since been replaced with newer versions. Among the various changes, some key data have been lost. For example, the party-specific data labels for party preference in Brazil in 2002 existed in the version of the data we analyzed but have vanished in the newer version. Since it is not possible to exactly replicate the results using the current publicly available versions of these files, we provide subsets of the original files used for analysis, containing the data only for Brazil and only for those variables used in the analysis.For the Pew survey data on religion in Latin America, we provide the original data files used for analysis, since Pew's Terms of Use permit redistribution. The Churches North and South data were collected by Amy Erica Smith in 2014. The data and documentation are posted on the Dataverse site for Amy Erica Smith’s book, Religion and Brazilian Democracy: Mobilizing the People of God (2019, Cambridge University Press): https://dataverse.harvard.edu/dataverse/religion_democracy_brazil. Additional information on the data may be found in the Appendix and in her book. For any outstanding questions, please email Amy Erica: amyericas@gmail.com.The archive reproduces all tables and figures from the main text and Appendix except for Appendix Tables 6-8, which convey survey question wording and do not involve data analysis. Figures are generated in the main directory as PDFs, and tables as .tex files. The correspondence between files and Figure/Table numbers is summarized below:Main text Figure 1: wtd_ecdf_diff_points_plot.pdfMain text Figure 2: effect_comparison_weighted3.pdfMain text Figure 3: clergy_figure.pdfMain text Figure 4: congregation_variance_figure.pdfMain text Table 1: evang_convert_vs_lifelong_table.texAppendix Figure 1: rollcall.pdfAppendix Figure 2: partyid_ecdf_plot.pdfAppendix Figure 3: wtd_ecdf_diff_points_plot_disagg.pdfAppendix Figure 4: meandiff_points_plot.pdfAppendix Figure 5: wtd_ks_points_plot.pdfAppendix Figure 6: wtd_ecdf_diff_points_plot_sample.pdfAppendix Figure 7: effect_comparison_nocontrols_weighted3.pdfAppendix Figure 8: evang_convert_vs_lifelong_plot.pdfAppendix Table 1: partic_table.texAppendix Table 2: reg_table.tex Appendix Table 3: descr_table.texAppendix Table 4: mass_descr_table.texAppendix Table 5: demog_matrix.texAppendix Table 9: n_table.texAppendix Table 10: client_table.texAppendix Table 11: results_table_abs_3_weighted3.texAppendix Table 12: results_table_abs_4_weighted3.texAppendix Table 13: vfr_firststage_reg.texAppendix Table 14: vfr_secondstage_reg.texAppendix Table 15: vfr_firststage.texAppendix Table 16: vfr_secondstage.texTo generate a single PDF document containing all of the properly-formatted (pre-publication) tables and figures from both the main text and Appendix, please compile the file looks_like_me_replication.tex.The archive contains the following files:1_merge_lapop.R: Reads the Brazil AmericasBarometer and Brazilian Electoral Panel Study files, merges in external data, and writes new files to the working directory.2_merge_latinobarometro.R: Reads the Brazil Latinobarómetro files, merges in external data, and writes new files to the working directory.3_recode_reshape.R: Recodes mass and elite survey data and write files for analysis: one containing all elite survey data, one containing all mass survey data, and one containing all legislator-constituent dyads. It also replicates Appendix Figure 1 and one result conveyed textually in the article.4_difference_in_distributions.R: Replicates main text Figure 1 and Appendix Figures 2 and 3.5_regressions.R: Replicates main text Figure 2, Appendix Figure 7, and Appendix Tables 11-12.6_civil_society_meeting.R: Replicates Appendix Table 1 as well as a result conveyed textually in the Appendix.7_mass_descriptives.R: Replicates Appendix Tables 2, 4, and 5.8_elite_descriptives.R: Replicates Appendix Tables 3 and 10 as well as a result conveyed textually in the Appendix.9_mean_differences.R: Replicates Appendix Figure 4.10_difference_in_distributions_ks.R: Replicates Appendix Figure 5.11_elite_sample_simulation.R: Replicates Appendix Table 9 and Appendix Figure 6.12_converts_vs_lifelong.R: Replicates main text Table 1 and Appendix Figure 8.13_churches_n&s.do: Replicates main text Figures 3 and 4 and Appendix Tables 13-16.bancada_negra_2006_johnson.csv: Afro-Brazilian federal deputies elected in 2006. From Race, Politics, and Education in Brazil: Affirmative Action in Higher Education, Edited by Ollie A. Johnson III and Rosana Heringer (Palgrave Macmillan, 2015), Appendices 1.1 and 1.2.bancada_negra_2010_johnson.csv: Afro-Brazilian federal deputies elected in 2010. From Race, Politics, and Education in Brazil: Affirmative Action in Higher Education, Edited by Ollie A. Johnson III and Rosana Heringer (Palgrave Macmillan, 2015), Appendices 1.1 and 1.2.bancadas.evangelicas_pluscedi.dta: Database of evangelical deputies. See main text for sources.bls05augmented.RData: Brazilian Legislative Survey 2005 data, augmented with additional variables used in the analysis.bls09augmented.RData: Brazilian Legislative Survey 2009 data, augmented with additional variables used in the analysis.bls13augmented.RData: Brazilian Legislative Survey 2013 data, augmented with additional variables used in the analysis.cand.data.02.RData: Data on candidates in Brazil's 2002 election, from the Tribunal Superior Eleitoralcand.data.06.RData: Data on candidates in Brazil's 2006 election, from the Tribunal Superior Eleitoralcand.data.10.RData: Data on candidates in Brazil's 2010 election, from the Tribunal Superior Eleitoralcand.data.98.RData: Data on candidates in Brazil's 1998 election, from the Tribunal Superior Eleitoralcity_childwealth_crosstab.csv: Crosstab generated using Latinobarómetro's online analysis tool, used in data mergingcity_mostpower_crosstab.csv: Crosstab generated using Latinobarómetro's online analysis tool, used in data mergingdata_rosettastone.RData: A crosswalk of different identifier codes for Brazilian municípios (courtesy of Cesar Zucco, Jr.)ESTADOS E CAPITAIS DO BRASIL.html: Table of state names and abbreviations.lb_brazil02.RData: Selected variables from Latinobarómetro 2002 Brazil data file, version downloaded November 2013.lb_brazil03.RData: Selected variables from Latinobarómetro 2003 Brazil data file, version downloaded November 2013.lb_brazil04.RData: Selected variables from Latinobarómetro 2004 Brazil data file, version downloaded November 2013.lb_brazil05.RData: Selected variables from Latinobarómetro 2005 Brazil data file, version downloaded November 2013.lb_brazil06.RData: Selected variables from Latinobarómetro 2006 Brazil data file, version downloaded November 2013.lb_brazil07.RData: Selected variables from Latinobarómetro 2007 Brazil data file, version downloaded November 2013.lb_brazil08.RData: Selected variables from Latinobarómetro 2008 Brazil data file, version downloaded November 2013.lb_brazil09.RData: Selected variables from Latinobarómetro 2009 Brazil data file, version downloaded November 2013.lb_brazil10.RData: Selected variables from Latinobarómetro 2010 Brazil data file, version downloaded November 2013.looks_like_me_replication.tex: Compiling this will generate a PDF document with all of the tables and figures from both the main text and Appendix.muni.pop.2010.csv: Population by município from Brazil's 2010 census.pew forum 10-country religion survey data.sav: Data from Pew Forum's Spirit and Power: A 10-Country Survey of Pentecostals (2006)readme.pdf: This file (PDF version)readme.txt: This file (text version)region2010.csv: Population by age bracket and region from Brazil's 2010 census.Religion in Latin America Dataset.sav: Data from Pew Forum's Religion in Latin America survey (2014)